import React from "react";
import CircleIcon from "./Circle";
import { IIconProps } from "./Iconprops";
import YouzanIcon from "./Youzan";

export interface IIconPropsWithProps extends IIconProps{
  icon: string;
}

export default function Icon({icon,...rest}:IIconPropsWithProps){
  if(icon === 'youzan'){
    return <YouzanIcon {...rest}/>;
  }
  if(icon === 'circle'){
    return <CircleIcon {...rest}/>;
  }
  return null;
}
